# -*- coding: utf-8 -*-
'''
Created on 2010-5-18

@author: Jason
'''
from django.conf.urls.defaults import *
from django.views.generic.simple import redirect_to


urlpatterns = patterns('',
    (r'^wakeup/$','moral.views.wakeup'), 
    (r'^update_cache.run$','moral.views.update_cache'),                       
    (r'^$', 'moral.views.index'),
#    (r'^send/$', 'moral.views.send_sms'),
    (r'^index.html$', 'moral.views.index'),
    (r'^roll_call.html$', 'moral.views.roll_call'),
    (r'^userinfo.html$', 'moral.views.userinfo'),
    (r'^userlist.html$','moral.views.userlist'),
    (r'^moral_log_(pri|pub)_(.*).html','moral.views.moral_logs'),
    (r'^change_pri_moral_(.*).html$','moral.views.change_moral_pri'),
    (r'^change_pub_moral_(.*).html$','moral.views.change_moral_pub'), 
    (r'moral_op_msg_(.*).html$','moral.views.moral_op_msg'),   
    (r'^sign/$', 'guestbook.views.create_entry'), 
    (r'^show_user_(.*).html$','moral.views.show_user'),
    (r'^banfei_log.html$', 'moral.views.banfei_log'),
    (r'^change_banfei.html$', 'moral.views.change_banfei'),
#    (r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'index.html'}),
    (r'^loginl/$', 'moral.views.login'),
    (r'^logout/$', 'django.contrib.auth.views.logout_then_login', {'login_url': '/'}),
    (r'account/password/reset/(.*).html','moral.views.reset_userpwd'),
    (r'^account/password/$',redirect_to,{'url':'/'}),
    (r'^account/password/logout/$',redirect_to,{'url':'/logout'}),
    (r'^initdb$','moral.views.initdb'),
#    (r'^myadmin/uploaduser/$','moral.views.upload_users'),
#    (r'^myadmin/init_student/$','moral.views.init_student'),
#    (r'^password/change/$','django.contrib.auth.views.password_change'), 
)